﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using Aliphant.UI.Widgets;
using Aliphant.UI;
using Aliphant.Interfaces;
using Aliphant.IoC;
using System.Diagnostics;

namespace ScriptDemo.Views
{
    /// <summary>
    /// UserControl1.xaml 的交互逻辑
    /// </summary>
    public partial class UserControl1 : BaseWidget, IWidget
    {
        public UserControl1()
        {
            InitializeComponent();
        }

        public void Init(Widget widget)
        {

        }

        public async void SetScriptPath(string scriptPath)
        {
            var manager = IoCServer.Container.Resolve<IScriptManager>();
            await manager.ExecuteAsync(scriptPath, this, new string[] { "Aliphant.UI.Forms" });
        }

        public void QuickAction1()
        {

        }

        public void QuickAction2()
        {

        }

        public void Close()
        {

        }

        public string? QuickButton1Tip => string.Empty;

        public string? QuickButton2Tip => string.Empty;

        public string? QucikButton1Icon => string.Empty;

        public string? QucikButton2Icon => string.Empty;

        private void actionBtn_Click(object sender, RoutedEventArgs e)
        {
            Debug.WriteLine(testBtn.Content);
        }
    }
}
